
package uk.addie.mp3fixer.visitors;

import java.nio.file.Path;

import uk.addie.mp3fixer.MP3Fixer;
import uk.addie.mp3fixer.MP3Handle;

public class ChangeArtist extends AbstractVisitor {
    private String artist;

    @Override protected String buttonName() {
        return "Artist like this";
    }

    @Override protected void modifyMp3(final MP3Handle mp3, final Path file) {
        mp3.setArtist(artist).save();
    }

    @Override public void run() {
        artist = MP3Fixer.mp3info().mTarget.getArtist();
        super.run();
    }
}
